<template>
  <div>
    <!-- 
      在使用v-bind的时候，直接赋值一个对象，v-bind会把对象的键值对作为属性设置给当前的模板
    -->
    <!-- <div v-bind="{a:'1',b:'2'}">111</div> -->

    <MyHeader v-bind="person" />
    <hr />

    <h2>每次加2</h2>
    <Count :num="2" />

    <br />
    <Update :person="person" :count="0" />
  </div>
</template>

<script>
import MyHeader from "./components/MyHeader";
import Count from "./components/Count";
import Update from "./components/Update";

export default {
  name: "App",
  data() {
    return {
      person: {
        name: "laowang",
        age: 18,
        sex: "nan",
      },
    };
  },
  // 注册
  components: {
    MyHeader,
    Count,
    Update,
  },
  methods: {},
};
</script>

<style scoped>
</style>